package com.cw.jeeyt.service.intf.system;

import java.util.List;

import com.cw.jeeyt.service.bo.system.SystemDatabaseTableBo;
import com.cw.lang.mybatis.dto.PageInfo;

/**
 * 数据库表信息业务接口
 * @author chenw
* @version 1.0.0
 */
public interface SystemDatabaseTableService {
    /**
     * 根据主键查询数据库表信息
     *
     * @param id 主键
     * @return
     */
    SystemDatabaseTableBo getSystemDatabaseTableById(String id) throws Exception;

    /**
     * 删除数据库表信息
     *
     * @param systemDatabaseTableBo
     */
    void deleteSystemDatabaseTable(SystemDatabaseTableBo systemDatabaseTableBo) throws Exception;

    /**
     * 更新数据库表信息
     *
     * @param systemDatabaseTableBo
     */
    void updateSystemDatabaseTable(SystemDatabaseTableBo systemDatabaseTableBo) throws Exception;

    /**
     * 新增数据库表信息
     *
     * @param systemDatabaseTableBo
     * @return
     */
    void insertSystemDatabaseTable(SystemDatabaseTableBo systemDatabaseTableBo) throws Exception;

    /**
     * 分页查询数据库表信息
     *
     * @param systemDatabaseTableBo
     * @param startNum
     * @param pageSize
     * @return
     * @throws Exception
     */
    PageInfo<SystemDatabaseTableBo> queryByPage(SystemDatabaseTableBo systemDatabaseTableBo, Integer startNum,
        Integer pageSize) throws Exception;

    /**
     * 同步数据库表信息、表字段信息
     *
     * @param databaseId
     * @throws Exception
     */
    void syncSystemDatabaseTable(String databaseId) throws Exception;

    /**
     * 删除当前数据库下的表信息、表字段信息
     *
     * @param databaseId 数据库id
     */
    void deleteByDatabaseId(String databaseId) throws Exception;

    /**
     * 加载要同步的数据库表信息
     *
     * @param systemDatabaseTableBo
     * @param moduleId 模块id
     * @param start
     * @param length
     * @return
     * @throws Exception
     */
    PageInfo<SystemDatabaseTableBo> querySyncByPage(SystemDatabaseTableBo systemDatabaseTableBo, String moduleId,
        Integer start, Integer length) throws Exception;

    /**
     * 查询所有数据库表信息
     *
     * @return
     * @throws Exception
     */
    List<SystemDatabaseTableBo> queryList() throws Exception;
}
